local zaoli = fk.CreateSkill({
  name = "kq__zaoli", 
  tags = {Skill.Compulsory},
})

zaoli:addEffect(fk.EventPhaseStart, {
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(zaoli.name) and player.phase == Player.Play
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local num = player.hp - 1
    room:loseHp(player, num, zaoli.name)
    player:drawCards(num,zaoli.name)
  end,
})

zaoli:addEffect(fk.AfterCardsMove, {
  can_trigger = function(self, event, target, player, data)
    local room = player.room
    if player:hasSkill(zaoli.name) and room.current == player then
        for _, move in ipairs(data) do
            if move.from == player then
                for _, info in ipairs(move.moveInfo) do
                    local suit = Fk:getCardById(info.cardId).suit
                    if suit and table.every(player:getCardIds("he"), function (id)
                        return Fk:getCardById(id).suit ~= suit
                    end) then
                        return true
                    end
                end
            end
        end
    end
  end,
  on_use = function(self, event, target, player, data)
    player.room:recover{
        who = player,
        num = 1,
        recoverBy = player,
        skillName = zaoli.name,
    }
  end,
})

Fk:loadTranslationTable {
["kq__zaoli"] = "躁厉",
[":kq__zaoli"] = "锁定技，出牌阶段开始时，你将体力值失去至1，并摸失去的体力值张牌;当你于回合内失去一张牌时，若你没有此花色的牌，你回复1点体力。",
["$kq__zaoli1"] = "喜怒不形于色，诈伪要名之徒！",
["$kq__zaoli2"] = "摇唇鼓舌，竖子是之也！",
}
return zaoli